<?php
/**
 * Created by  yuxianjun001@icloud.com.
 * User: wuchen
 * Date: 2017/12/8
 * Time: 16:57
 */

namespace App\home\controller;
use App\home\model\Company  as Company;
use App\home\model\Eb_agent_level;
use App\home\model\Ebagentlevel;
Use Common\controller\Controller;
use Twig\NodeVisitor\EscaperNodeVisitor;

class Home extends Controller
{

    public function index(){
        echo "hello myFrame!";
    }

    /**
     * 获取公司信息
     */
    public function companyInfo(){
      $all=Company::all();
      foreach ($all as $v){
          echo $v.'<br/>';
      }
    }

    public function info(){
        $num=[
            1,2,3,4,5,6
        ];
        foreach($num as $k){
          //  echo "$k".' - ';
        }

        //读取moedl层数据
        $eb_agent_level=Ebagentlevel::where('id','>',1)->get();
        //var_dump($eb_agent_level);die;
        foreach ($eb_agent_level as $eb){
            echo $eb->image."<br />";

        }

       // var_dump(env("APP_ENV"));


        }


}